<?php
require_once 'lib/standard.php';
require_once 'pektis/pektis.php';
set_globals();

if ($globals->perastike('logout')) {
	unset($_SESSION['tl_login']);
}
set_pektis();

$rank = $globals->session_set('tl_rank') ? $_SESSION['tl_rank'] : 6;
if ($globals->perastike('rank') && is_numeric($_REQUEST["rank"])) {
	if ($_REQUEST["rank"] < 2) {
		$rank = 2;
	}
	else if ($_REQUEST["rank"] > MAX_RANK) {
		$rank = MAX_RANK;
	}
	else {
		$rank = $_REQUEST["rank"];
	}
}

Page::head();
Page::stylesheet("tetralat/tetralat");
Page::javascript("tetralat/tetralat");
Page::javascript("tetralat/panel");
Page::javascript("tetralat/adinata");
if ($globals->perastike("debug")) {
	Page::javascript("tetralat/debug");
}
?>
<script type="text/javascript">
//<![CDATA[
tetralat.rank = <?php print $rank; ?>;
tetralat.diamperes = <?php print $globals->session_set('tl_diamperes') ?
	$_SESSION['tl_diamperes'] : 'false'; ?>;
tetralat.ipodixi = <?php print $globals->session_set('tl_ipodixi') ?
	$_SESSION['tl_ipodixi'] : 'false'; ?>;
//]]>
</script>
<?php
Page::body();
Page::toolbar();
Page::fyi_top();
?>
<div id="main" class="main">
</div>
<?php
Page::fyi_bottom();
Page::close();
$globals->klise_fige();
